set (handPlane_VERSION_MAJOR 1)
set (handPlane_VERSION_MINOR 0)

SET(QT_USE_QTOPENGL TRUE)

SET(handPlane_SOURCES HandPlane.cpp window.cpp gamewindow.cpp state.cpp statemanager.cpp stateexception.cpp menustate.cpp menudialog.cpp gamestate.cpp settings.cpp gameapplication.cpp resultwidget.cpp instructionstate.cpp instructionwidget.cpp)
SET(handPlane_HEADERS_TO_MOC window.h gamewindow.h state.h statemanager.h stateexception.h menustate.h menudialog.h gamestate.h settings.h gameapplication.h resultwidget.h instructionstate.h instructionwidget.h)
SET(handPlane_FORMS menudialog.ui settings.ui resultwidget.ui instructionwidget.ui)
SET(handPlane_RESOURCES game.qrc)

QT4_WRAP_UI(handPlane_FORMS_HEADERS ${handPlane_FORMS})
QT4_WRAP_CPP(handPlane_HEADERS_MOC ${handPlane_HEADERS_TO_MOC})
QT4_ADD_RESOURCES(handPlane_RESOURCES_RCC ${handPlane_RESOURCES})

include_directories ("${CMAKE_CURRENT_SOURCE_DIR}/../mlgesture")
INCLUDE(${QT_USE_FILE})

ADD_DEFINITIONS(${QT_DEFINITIONS})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})

add_executable(handPlane ${handPlane_SOURCES} ${handPlane_HEADERS_MOC} ${handPlane_FORMS_HEADERS} ${handPlane_RESOURCES_RCC})
target_link_libraries (handPlane mlgesture ${QT_LIBRARIES} ${OpenCV_LIBS} ${Boost_THREAD_LIBRARY} ${FMODEX_LIBRARY})

install(TARGETS handPlane DESTINATION ${CMAKE_BINARY_DIR}/app PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
